/**全局的功能函数 */
var GUtil = {
    /**节点坐标转换   
     * fromNode 要转换的节点  
     * toNode 转换到的目标节点
    */
    positionChange(fromNode, toNode){
        return toNode.convertToNodeSpaceAR(fromNode.parent.convertToWorldSpaceAR(fromNode.position));
    },

    /**是否为安卓系统 */
    isAndroid(){
        if(cc.sys.platform === cc.sys.WECHAT_GAME){
            if(!this.sys){
                var getSystemInfoSync = wx.getSystemInfoSync();
                this.sys = getSystemInfoSync.system;
            }
            return this.sys.indexOf("Android") > -1;
        }
    }
};

window.GUtil = GUtil;

